home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / lmrepl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  6.8 KB  |  287 lines

  1. /*++ BUILD Version: 0004    // Increment this if a change has global effects
  2.  
  3. Copyright (c) 1991-1996  Microsoft Corporation
  4.  
  5. Module Name:
  6.  
  7.     LmRepl.h
  8.  
  9. Abstract:
  10.  
  11.     This file contains structures, function prototypes, and definitions
  12.     for the replicator APIs.
  13.  
  14. Environment:
  15.  
  16.     User Mode - Win32
  17.     Portable to any flat, 32-bit environment.  (Uses Win32 typedefs.)
  18.     Requires ANSI C extensions: slash-slash comments, long external names.
  19.  
  20. Notes:
  21.  
  22.     You must include LmCons.h before this file.
  23.  
  24.  
  25. --*/
  26.  
  27. /*
  28.  *      C/C++ Run Time Library - Version 9.0
  29.  *
  30.  *      Copyright (c) 1997, 1998 by Borland International
  31.  *      All Rights Reserved.
  32.  *
  33.  */
  34.  
  35. #ifndef _LMREPL_
  36. #define _LMREPL_
  37. #pragma option push -b
  38.  
  39.  
  40. #ifdef __cplusplus
  41. extern "C" {
  42. #endif
  43.  
  44. //
  45. // Replicator Configuration APIs
  46. //
  47.  
  48. #define REPL_ROLE_EXPORT        1
  49. #define REPL_ROLE_IMPORT        2
  50. #define REPL_ROLE_BOTH          3
  51.  
  52.  
  53. #define REPL_INTERVAL_INFOLEVEL         (PARMNUM_BASE_INFOLEVEL + 0)
  54. #define REPL_PULSE_INFOLEVEL            (PARMNUM_BASE_INFOLEVEL + 1)
  55. #define REPL_GUARDTIME_INFOLEVEL        (PARMNUM_BASE_INFOLEVEL + 2)
  56. #define REPL_RANDOM_INFOLEVEL           (PARMNUM_BASE_INFOLEVEL + 3)
  57.  
  58.  
  59. typedef struct _REPL_INFO_0 {
  60.     DWORD          rp0_role;
  61.     LPWSTR         rp0_exportpath;
  62.     LPWSTR         rp0_exportlist;
  63.     LPWSTR         rp0_importpath;
  64.     LPWSTR         rp0_importlist;
  65.     LPWSTR         rp0_logonusername;
  66.     DWORD          rp0_interval;
  67.     DWORD          rp0_pulse;
  68.     DWORD          rp0_guardtime;
  69.     DWORD          rp0_random;
  70. } REPL_INFO_0, *PREPL_INFO_0, *LPREPL_INFO_0;
  71.  
  72. typedef struct _REPL_INFO_1000 {
  73.     DWORD          rp1000_interval;
  74. } REPL_INFO_1000, *PREPL_INFO_1000, *LPREPL_INFO_1000;
  75.  
  76. typedef struct _REPL_INFO_1001 {
  77.     DWORD          rp1001_pulse;
  78. } REPL_INFO_1001, *PREPL_INFO_1001, *LPREPL_INFO_1001;
  79.  
  80. typedef struct _REPL_INFO_1002 {
  81.     DWORD          rp1002_guardtime;
  82. } REPL_INFO_1002, *PREPL_INFO_1002, *LPREPL_INFO_1002;
  83.  
  84. typedef struct _REPL_INFO_1003 {
  85.     DWORD          rp1003_random;
  86. } REPL_INFO_1003, *PREPL_INFO_1003, *LPREPL_INFO_1003;
  87.  
  88.  
  89. NET_API_STATUS NET_API_FUNCTION
  90. NetReplGetInfo (
  91.     IN LPCWSTR servername OPTIONAL,
  92.     IN DWORD level,
  93.     OUT LPBYTE * bufptr
  94.     );
  95.  
  96. NET_API_STATUS NET_API_FUNCTION
  97. NetReplSetInfo (
  98.     IN LPCWSTR servername OPTIONAL,
  99.     IN DWORD level,
  100.     IN const LPBYTE buf,
  101.     OUT LPDWORD parm_err OPTIONAL
  102.     );
  103.  
  104.  
  105. //
  106. // Replicator Export Directory APIs
  107. //
  108.  
  109. #define REPL_INTEGRITY_FILE     1
  110. #define REPL_INTEGRITY_TREE     2
  111.  
  112.  
  113. #define REPL_EXTENT_FILE        1
  114. #define REPL_EXTENT_TREE        2
  115.  
  116.  
  117. #define REPL_EXPORT_INTEGRITY_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + 0)
  118. #define REPL_EXPORT_EXTENT_INFOLEVEL    (PARMNUM_BASE_INFOLEVEL + 1)
  119.  
  120.  
  121. typedef struct _REPL_EDIR_INFO_0 {
  122.     LPWSTR         rped0_dirname;
  123. } REPL_EDIR_INFO_0, *PREPL_EDIR_INFO_0, *LPREPL_EDIR_INFO_0;
  124.  
  125. typedef struct _REPL_EDIR_INFO_1 {
  126.     LPWSTR         rped1_dirname;
  127.     DWORD          rped1_integrity;
  128.     DWORD          rped1_extent;
  129. } REPL_EDIR_INFO_1, *PREPL_EDIR_INFO_1, *LPREPL_EDIR_INFO_1;
  130.  
  131. typedef struct _REPL_EDIR_INFO_2 {
  132.     LPWSTR         rped2_dirname;
  133.     DWORD          rped2_integrity;
  134.     DWORD          rped2_extent;
  135.     DWORD          rped2_lockcount;
  136.     DWORD          rped2_locktime;
  137. } REPL_EDIR_INFO_2, *PREPL_EDIR_INFO_2, *LPREPL_EDIR_INFO_2;
  138.  
  139. typedef struct _REPL_EDIR_INFO_1000 {
  140.     DWORD          rped1000_integrity;
  141. } REPL_EDIR_INFO_1000, *PREPL_EDIR_INFO_1000, *LPREPL_EDIR_INFO_1000;
  142.  
  143. typedef struct _REPL_EDIR_INFO_1001 {
  144.     DWORD          rped1001_extent;
  145. } REPL_EDIR_INFO_1001, *PREPL_EDIR_INFO_1001, *LPREPL_EDIR_INFO_1001;
  146.  
  147.  
  148. NET_API_STATUS NET_API_FUNCTION
  149. NetReplExportDirAdd (
  150.     IN LPCWSTR servername OPTIONAL,
  151.     IN DWORD level,
  152.     IN const LPBYTE buf,
  153.     OUT LPDWORD parm_err OPTIONAL
  154.     );
  155.  
  156. NET_API_STATUS NET_API_FUNCTION
  157. NetReplExportDirDel (
  158.     IN LPCWSTR servername OPTIONAL,
  159.     IN LPCWSTR dirname
  160.     );
  161.  
  162. NET_API_STATUS NET_API_FUNCTION
  163. NetReplExportDirEnum (
  164.     IN LPCWSTR servername OPTIONAL,
  165.     IN DWORD level,
  166.     OUT LPBYTE * bufptr,
  167.     IN DWORD prefmaxlen,
  168.     OUT LPDWORD entriesread,
  169.     OUT LPDWORD totalentries,
  170.     IN OUT LPDWORD resumehandle OPTIONAL
  171.     );
  172.  
  173. NET_API_STATUS NET_API_FUNCTION
  174. NetReplExportDirGetInfo (
  175.     IN LPCWSTR servername OPTIONAL,
  176.     IN LPCWSTR dirname,
  177.     IN DWORD level,
  178.     OUT LPBYTE * bufptr
  179.     );
  180.  
  181. NET_API_STATUS NET_API_FUNCTION
  182. NetReplExportDirSetInfo (
  183.     IN LPCWSTR servername OPTIONAL,
  184.     IN LPCWSTR dirname,
  185.     IN DWORD level,
  186.     IN const LPBYTE buf,
  187.     OUT LPDWORD parm_err OPTIONAL
  188.     );
  189.  
  190. NET_API_STATUS NET_API_FUNCTION
  191. NetReplExportDirLock (
  192.     IN LPCWSTR servername OPTIONAL,
  193.     IN LPCWSTR dirname
  194.     );
  195.  
  196. NET_API_STATUS NET_API_FUNCTION
  197. NetReplExportDirUnlock (
  198.     IN LPCWSTR servername OPTIONAL,
  199.     IN LPCWSTR dirname,
  200.     IN DWORD unlockforce
  201.     );
  202.  
  203.  
  204. #define REPL_UNLOCK_NOFORCE     0
  205. #define REPL_UNLOCK_FORCE       1
  206.  
  207.  
  208. //
  209. // Replicator Import Directory APIs
  210. //
  211.  
  212.  
  213. typedef struct _REPL_IDIR_INFO_0 {
  214.     LPWSTR         rpid0_dirname;
  215. } REPL_IDIR_INFO_0, *PREPL_IDIR_INFO_0, *LPREPL_IDIR_INFO_0;
  216.  
  217. typedef struct _REPL_IDIR_INFO_1 {
  218.     LPWSTR         rpid1_dirname;
  219.     DWORD          rpid1_state;
  220.     LPWSTR         rpid1_mastername;
  221.     DWORD          rpid1_last_update_time;
  222.     DWORD          rpid1_lockcount;
  223.     DWORD          rpid1_locktime;
  224. } REPL_IDIR_INFO_1, *PREPL_IDIR_INFO_1, *LPREPL_IDIR_INFO_1;
  225.  
  226.  
  227. NET_API_STATUS NET_API_FUNCTION
  228. NetReplImportDirAdd (
  229.     IN LPCWSTR servername OPTIONAL,
  230.     IN DWORD level,
  231.     IN const LPBYTE buf,
  232.     OUT LPDWORD parm_err OPTIONAL
  233.     );
  234.  
  235. NET_API_STATUS NET_API_FUNCTION
  236. NetReplImportDirDel (
  237.     IN LPCWSTR servername OPTIONAL,
  238.     IN LPCWSTR dirname
  239.     );
  240.  
  241. NET_API_STATUS NET_API_FUNCTION
  242. NetReplImportDirEnum (
  243.     IN LPCWSTR servername OPTIONAL,
  244.     IN DWORD level,
  245.     OUT LPBYTE * bufptr,
  246.     IN DWORD prefmaxlen,
  247.     OUT LPDWORD entriesread,
  248.     OUT LPDWORD totalentries,
  249.     IN OUT LPDWORD resumehandle OPTIONAL
  250.     );
  251.  
  252. NET_API_STATUS NET_API_FUNCTION
  253. NetReplImportDirGetInfo (
  254.     IN LPCWSTR servername OPTIONAL,
  255.     IN LPCWSTR dirname,
  256.     IN DWORD level,
  257.     OUT LPBYTE * bufptr
  258.     );
  259.  
  260. NET_API_STATUS NET_API_FUNCTION
  261. NetReplImportDirLock (
  262.     IN LPCWSTR servername OPTIONAL,
  263.     IN LPCWSTR dirname
  264.     );
  265.  
  266.  
  267. NET_API_STATUS NET_API_FUNCTION
  268. NetReplImportDirUnlock (
  269.     IN LPCWSTR servername OPTIONAL,
  270.     IN LPCWSTR dirname,
  271.     IN DWORD unlockforce
  272.     );
  273.  
  274.  
  275. #define REPL_STATE_OK                   0
  276. #define REPL_STATE_NO_MASTER            1
  277. #define REPL_STATE_NO_SYNC              2
  278. #define REPL_STATE_NEVER_REPLICATED     3
  279.  
  280.  
  281. #ifdef __cplusplus
  282. }
  283. #endif
  284.  
  285. #pragma option pop
  286. #endif //_LMREPL_
  287.